package objekte;

import hauptklassen.Main;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Player {
	
	private BufferedImage Car;
	
	int xGraphicSize = 100;			//Size of the Car
	int yGraphicSize = 150;
	
	double x,y,vx,vy;
	
	public Player(){
		try {
			Car = ImageIO.read(new File("bilder/Auto_schwarz.png"));
		} catch (IOException e) {
			try{
				Car =  ImageIO.read(new File("bilder\\Auto_schwarz.png"));
			}catch (Exception ex){
				e.printStackTrace();
			}
		}
		this.x = Main.m.getWidth()/2-xGraphicSize/2;
		this.y = Main.m.getHeight()-yGraphicSize-100;
		this.vx = 0;
		this.vy = 0;
	}
	
	public void update(){
		
	}
	public void draw(Graphics g){
		g.drawImage(Car,(int)this.x,(int)this.y,xGraphicSize,yGraphicSize,null);
	}
}
